package leju.common.widget;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ProgressBar;

import com.leju.common.R;

public class MyDialog extends Dialog
{

	private Window window = null;
	private Context context;

	public MyDialog(Context context)
	{
		super(context);
		this.context = context;
	}

	public void showDialog()
	{
		setContentView(new ProgressBar(context));
		window = getWindow();
		window.setBackgroundDrawableResource(R.color.transparent);
		WindowManager.LayoutParams wl = window.getAttributes();
		setCanceledOnTouchOutside(false);
		wl.dimAmount = 0.4f;
		wl.y = -20;
		window.setAttributes(wl);
		show();
	}
}
